package com.tianhao.luo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName: NovelBook
 * @Description: 小说类
 *
 * 我们把价格定义为int类型并不是错误，在非金融类项目中对货币处理时，一般取2位精度，通常的设计方法是在运算过程中扩大100倍，在需要展示时再缩小100倍，减少精度带来的误差。
 * @author: tianhao.luo@hand-china.com
 * @date: 2020/7/14  17:41
 */
public class NovelBook implements IBook{
    private static final Logger LOGGER = LoggerFactory.getLogger(NovelBook.class);
    private String name;
    private int price;
    private String author;

    public NovelBook(String name, int price, String author) {
        this.name = name;
        this.price = price;
        this.author = author;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public int getPrice() {
        return this.price;
    }

    @Override
    public String getAuthor() {
        return this.author;
    }
}
